<!--内容开始-->
<section class="content">
    <div class="search">
        <form class="form-inline" action="">
            <a class="btn btn-flat btn-primary m_10" href="{:url('index',['type'=>$type])}">显示全部</a>
            <a class="btn btn-flat btn-success m_10 f_r m_t_5" onclick="javascript :history.back(-1)"><i
                    class="fa fa-undo m-r-10"></i>返 回</a>
        </form>
    </div>
    <!--数据表开始-->
    {if $info}
    <form method="post" action="{:url('editPost')}">
        <input type="hidden" name="filename" value="{$info.filename}"/>
        <input type="hidden" name="type" value="{$info.type}"/>
    {else /}
    <form method="post" action="{:url('addPost')}">
        {/if}
        <!---->
        <div class="row">
            <div class="col-sm-12 col-xs-12">
                <div class="box box-body">
                    <!---->
                    <div class="row dd_input_group">
                        <div class="form-group">
                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">文件名称</label>
                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                <input type="text" name="filename" class="form-control" placeholder="请输入文件名称"
                                       value="{$info.filename?$info.filename:''}" {if $info['filename']}readonly{/if}>
                            </div>
                            <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">* 不需要输入文件后缀，如 style.css
                                请填写style
                            </div>
                        </div>
                    </div>
                    <!---->
                    <div class="row dd_input_group">
                        <div class="form-group">
                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">类型</label>
                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                <div class="dd_radio_lable_left">
                                    {if $info}
                                    <label class="dd_radio_lable">
                                        <input type="radio" name="type" value="html" class="dd_radio" {if $info['type']=='html'}checked{/if}
                                        disabled="disabled" ><span>模板文件</span>
                                    </label>
                                    <label class="dd_radio_lable">
                                        <input type="radio" name="type" value="css" class="dd_radio" {if $info['type']=='css'}checked{/if}
                                        disabled="disabled" ><span>CSS</span>
                                    </label>
                                    <label class="dd_radio_lable">
                                        <input type="radio" name="type" value="js" class="dd_radio" {if $info['type']=='js'}checked{/if}
                                        disabled="disabled" ><span>JS</span>
                                    </label>
                                    {else /}
                                    <label class="dd_radio_lable">
                                        <input type="radio" name="type" value="html" class="dd_radio" {if
                                               $type=='html'}checked{/if}><span>模板文件</span>
                                    </label>
                                    <label class="dd_radio_lable">
                                        <input type="radio" name="type" value="css" class="dd_radio" {if
                                               $type=='css'}checked{/if}><span>CSS</span>
                                    </label>
                                    <label class="dd_radio_lable">
                                        <input type="radio" name="type" value="js" class="dd_radio" {if
                                               $type=='js'}checked{/if}><span>JS</span>
                                    </label>
                                    {/if}
                                </div>
                            </div>
                            <div class="col-xs-1 col-sm-4 col-md-6 col-lg-6 dd_ts"> *</div>
                        </div>
                    </div>
                    <!---->
                    <div class="row dd_input_group">
                        <div class="form-group">
                            <div class="col-xs-12 col-sm-11 col-md-10 col-lg-8">
                                <label class="text-lable">内容</label>
                                <textarea class="form-control" name="content" rows="15" placeholder="请输入内容">{$info.content?$info.content:''}</textarea>
                            </div>
                        </div>
                    </div>
                    <!---->
                    <div class="row dd_input_group">
                        <div class="form-group">
                            <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5 text-center">
                                <button type="submit" class="btn btn-flat btn-primary ">提 交</button>
                                <button type="button" class="btn btn-flat btn-default"
                                        onclick="javascript :history.back(-1)">返 回
                                </button>
                            </div>

                        </div>
                    </div>
                </div>
                <!-- /.box -->
            </div>
        </div>
    </form>
    <!--数据表结束-->
</section>
<!--内容结束-->
